package io.qar.dishes.dto;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.qar.commons.tools.utils.DateUtils;
import io.qar.flavors.dto.DishFlavorsDTO;
import io.qar.flavors.dto.FlavorsDTO;
import io.qar.images.dto.ImagesDTO;
import io.qar.rawMaterialsConfig.dto.RawMaterialsConfigDTO;
import io.qar.skus.dto.SkusDTO;
import io.qar.tags.dto.TagsDTO;
import io.qar.tags.entity.TagsEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import io.qar.commons.mybatis.dto.CreateAndUpdatedDTO;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
* 菜品信息表
*
* @author yyyyjinying 1020066395@qq.com
* @since 3.0 2024-06-10
*/
@Data
@ApiModel(value = "菜品信息表")
public class DishesDTO extends CreateAndUpdatedDTO implements Serializable {
    private static final long serialVersionUID = 1L;

    private Long dishId;
    @ApiModelProperty(value = "菜品名称")
    private String name;
    @ApiModelProperty(value = "菜品描述")
    private String description;
    @ApiModelProperty(value = "菜品价格")
    private BigDecimal price;
    @ApiModelProperty(value = "菜品图片URL")
    private String imageUrl;
    @ApiModelProperty(value = "菜品缩略图")
    private String thumbnailUrl;
    @ApiModelProperty(value = "菜品是否在售")
    private Integer isActive;
    @ApiModelProperty(value = "分类ID")
    private Long categoryId;
    @ApiModelProperty(value = "分类名称")
    private String categoryName;
    @ApiModelProperty(value = "菜单标签集合")
    @JsonSerialize(using = TagNameJsonSerializer.class)
    private  String tagNames;
    private Integer isDelete;
    @ApiModelProperty(value = "菜单口味集合") // @JsonSerialize：json序列化注解，作用于getter()方法，将java对象序列化为json数据
    @JsonSerialize(using = TagNameJsonSerializer.class)
    private  String flavorValues;
    @ApiModelProperty(value = "标签")
    private List<TagsDTO> tagLists;
    @ApiModelProperty(value = "口味")
    private List<DishFlavorsDTO> flavorLists;
    private List<ImagesDTO> imageLists;
    private List<ImagesDTO> thumbnailLists;
    @ApiModelProperty(value = "Sku列表")
    private List<SkusDTO> skuLists;
    @ApiModelProperty(value = "物料列表")
    private List<RawMaterialsConfigDTO> materialLists;

}